/**
 * Created by patrick on 9/9/2017.
 */
public class ScoreTreeNode extends TreeNode {

    private int minScore;
    private int maxScore;

    public ScoreTreeNode(String id) {
        super(id);
    }


    public int getMinScore() {
        return minScore;
    }

    public void setMinScore(int minScore) {
        this.minScore = minScore;
    }

    public int getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(int maxScore) {
        this.maxScore = maxScore;
    }

    public TreeNode findNodeById(String id) {
        return null;
    }

    public String genTableRow() {
        StringBuffer sb = new StringBuffer(super.genTableRow());
        if(!this.hasChild()){
            sb.append("<td>");
            sb.append(this.minScore);
            sb.append("~");
            sb.append(this.maxScore);
            sb.append("</td>");
        }

        return sb.toString();
    }

}
